package com.wang.todoList.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wang.todoList.VO.PasswordVo;
import com.wang.todoList.entity.Admin;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author zifan
 * @since 2021-07-10
 */
public interface AdminService extends IService<Admin> {

    /**
     * 用户注册
     * @param admin 用户实体
     * @return 返回结果
     */
    Map<String, Object> register(Admin admin);

    /**
     * 用户登录
     */
    Map<String, Object> login(Admin admin);

    /**
     * 获取用户信息
     */
    Map<String,Object> getAdminInfo(HttpServletRequest request);

    /**
     * 修改用户信息
     */
    Map<String, Object> modifyAdminInfo(HttpServletRequest request,Admin admin);

    /**
     * 校验密码是否正确
     */
    Map<String, Object> checkPassword(HttpServletRequest request, PasswordVo passwordVo);

    /**
     * 生成验证码值
     */
    void captcha(HttpServletRequest request, HttpServletResponse response);

    /**
     * 修改密码
     */
    Map<String, Object> updatePassword(HttpServletRequest request, PasswordVo passwordVo);
}
